<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>03_作用域链</title>
    </head>
    <body>
        <script>

            // var a = 0;

            function f1(){
                // var a = 1;
                function f2(){
                    // var a = 2;
                    function f3(){
                        // var a = 3;
                        function f4(){
                            // var a = 4;
                            console.log(a);
                        }

                        f4();
                    }
                    f3();
                }
                f2();
            }
            f1();

        </script>
    </body>
</html>